<% @page_title = "Editing todo" %>
<h1> <%= @page_title %> </h1>


<% form_for @todo, :url => { :action => "update" }, :html => { :multipart => true} do |f| %>

  <%= f.error_messages %>

  <p><label for="todo_title">Title</label><br/>
  <%= f.text_field :title %></p>
   <p><label for="todo_note">Note</label><br/>
  <%=f.text_area :note %></p>
  <p><label for="todo_status">Status</label><br/>
    <%=
            f.select 'status',
                           Todo::STATUS_TYPES,
                        :prompt => "Select status"
          %>
  </p>
  <p><label for="todo_briefcase">Upload file</label><br/>
  <%=f.file_field :briefcase %></p>
  <p>
    <%= f.submit 'Edit' %>
  </p>
<% end %>



<%= link_to 'Show', @todo %> |
<%= link_to 'Back', todos_path %>